/**
 * 
 */
package com.gr.staffpm.datatypes;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Proxy;


/**
 * @author Graham Rhodes 23 Dec 2010 17:51:32
 */
@Entity
@Proxy(lazy = false)
@Table(name = "task_importance")
public class TaskImportance implements Serializable {

    private static final long serialVersionUID = 1L;
    public static String ID = "importanceId";
    public static String VALUE = "value";
    public static String CREATED_BY = "createdBy";
    public static String CREATED = "created";
    public static String UPDATED_BY = "updatedBy";
    public static String LAST_UPDATED = "lastUpdated";
    private int importanceId = 0;
    private String value = "";
    private User createdBy = null;
    private Date created = new Date(Calendar.getInstance().getTimeInMillis());
    private User updatedBy = null;
    private Date lastUpdated = new Date(Calendar.getInstance().getTimeInMillis());

    @Id
    @GeneratedValue
    @Column(name = "importance_id")
    public int getImportanceId() {
        return importanceId;
    }

    @Basic
    @Column(name = "value")
    public String getValue() {
        return value;
    }

    @ManyToOne
    @JoinColumn(name = "createdBy")
    public User getCreatedBy() {
        return createdBy;
    }

    @Column(name = "created")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreated() {
        return created;
    }

    @ManyToOne
    @JoinColumn(name = "updatedBy")
    public User getUpdatedBy() {
        return updatedBy;
    }

    @Column(name = "lastUpdated")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdated() {
        return lastUpdated;
    }

    public void setImportanceId(int importanceId) {
        this.importanceId = importanceId;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public void setUpdatedBy(User updatedBy) {
        this.updatedBy = updatedBy;
    }

    public void setLastUpdated(Date lastUpdated) {
        this.lastUpdated = lastUpdated;
    }
}
